<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>表格</title>
	<style>
		table{
			width:50%;
			border:1px solid black;
			margin:0 auto;
			
			/*border-spacing:0px; 边框之间的距离
				border-collapse:边框合并
			
			*/
			border-collapse:collapse;
		}
		td{
			border:1px solid black;
			height:30px;
			text-align:center;
		}
		tbody > tr:nth-child(2n+1){
			background-color:#bfa;
		}
	</style>
</head>
<body>
	<table>
		<tr>
			<td>a1</td>
			<td>b1</td>
			<td>c1</td>
			<td>d1</td>
		</tr>
		<tr>
			<td>a2</td>
			<td>b2</td>
			<td>c2</td>
			<td>d2</td>
		</tr>
		<tr>
			<td>a1</td>
			<td>b1</td>
			<td>c1</td>
			<td>d1</td>
		</tr>
		<tr>
			<td>a1</td>
			<td>b1</td>
			<td>c1</td>
			<td>d1</td>
		</tr>
		<tr>
			<td>a1</td>
			<td>b1</td>
			<td>c1</td>
			<td>d1</td>
		</tr>
		<tr>
			<td>a1</td>
			<td>b1</td>
			<td>c1</td>
			<td>d1</td>
		</tr>
		<tr>
			<td>a1</td>
			<td>b1</td>
			<td>c1</td>
			<td>d1</td>
		</tr>
		<tr>
			<td>a1</td>
			<td>b1</td>
			<td>c1</td>
			<td>d1</td>
		</tr>
		<tr>
			<td>a1</td>
			<td>b1</td>
			<td>c1</td>
			<td>d1</td>
		</tr>
	</table>
</body>
</html>